<?php
/**
 * Created by PhpStorm.
 * User: lzy
 * Date: 2019/3/4
 * Time: 16:44
 */
namespace App\Ordersys\Controllers\Admin;

use App\Base\Controllers\Controller;
use Maatwebsite\Excel\Facades\Excel;


class ExcelController  extends Controller
{
    /**
     * @return Excel
     */
    public function getExcel(){
      return   app()->make(Excel::class);
    }
    //Excel文件导出功能 By Laravel学院
    public function export(){

        $cellData = [
            ['学号','姓名','成绩'],
            ['10001','AAAAA','99'],
            ['10002','BBBBB','92'],
            ['10003','CCCCC','95'],
            ['10004','DDDDD','89'],
            ['10005','EEEEE','96'],
        ];
        outExcel($cellData, "订单" . date("Y-m-d H:i"));
    }
}
